Hi Ray,
This is just determining the directory that the software is installed in. This is useful in case the Version changes or the directory is moved or renamed things can still be found correctly.
So for example the TeachMotion.exe example might be executing from:
C:\KMotion430j\KMotion\Release\TeachMotion.exe
Getting the Directory of the Directory of the Directory results in the root:
C:\KMotion430j
HTH
Regards
TK